package solutions;

public class Euler002 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		long result = 2;
		long a = 1, b = 2;
		long aux;
		
		while(b < 4000000){
			
			if(a%2 ==1 && b%2 ==1){
				result += (a + b);
			}
			
			aux = a + b;
			a = b;
			b = aux;		
		}
		
		System.out.println("Solution: " + result);
		
		

	}

}
